package com.dayuanit.dy17.mix.single;

/**
 * 使用枚举的方式来创建单例对象。 专家墙裂推荐*****
 */
public enum Panda {
    INSTANCE;

    private String name;
    private int price;

    public void say() {
        System.out.println("panda say");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }
}
